package com.meteor.downloader.videodownloader.clueft

import com.google.firebase.messaging.FirebaseMessagingService
import com.meteor.downloader.videodownloader.utils.DataManagerMdmUtils
import com.meteor.downloader.videodownloader.utils.value.ConstantMdm.MDM_TOKEN_FCM_VALUE

class FCMBackMdmBack : FirebaseMessagingService() {

    override fun onNewToken(token: String) {
        super.onNewToken(token)
        val mdmToken = DataManagerMdmUtils.getDataKeyMdm(MDM_TOKEN_FCM_VALUE, "")
        if (mdmToken != token) {
            DataManagerMdmUtils.setDataKeyMdm(MDM_TOKEN_FCM_VALUE, token)
            MdmTokenMeans.sendTokenGo(this, token)
        }
    }
}